package com.garyme.hycloud.service;

import com.garyme.hycloud.model.HyFile;
import com.garyme.hycloud.model.HyFileBase;
import org.springframework.web.multipart.MultipartFile;


import java.io.File;
import java.util.List;
import java.util.concurrent.CompletableFuture;

public interface IFileDirObserverService {
    //列出指定目录下所有文件
    HyFileBase listFileBase(String basePath,String path);
    List<HyFile> listFiles(String basePath,String dir);

    boolean delFileByName(String basePath,String name);
    //添加文件（上传或者粘贴）

    boolean renameFile(String basePath,String oldName,String newName);

    boolean copyFile(String basePath,String oldName,String newName);

    boolean moveFile(String basePath,String oldName,String newName);

    boolean newDir(String basePath,String name,String path);

//    List<HyFile> queryAllDisk();
    boolean chunkFile(MultipartFile file, String path, Integer chunkIdx, Integer chunkTotal, String fileName);

    boolean uploadFile(MultipartFile file,String path,String fileName);
    boolean mergeFiles(String basePath,String fileName,Integer chunkTotal);

//    CompletableFuture<HyFile> calcFileHashBackground(File file);

}
